import java.util.Scanner;
//数字翻转
//1. 0在数字末尾，那么
//2. 数字为负数时，-怎么处理
public class code03 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int N = scan.nextInt();
        StringBuilder str = new StringBuilder();
        if(N>0) {
            str.append(N);
            StringBuilder str1 = str.reverse();
            String str2 = new String(str1);
            int x = Integer.valueOf(str2);
            System.out.print(x);
        } else {
            str.append(-N);
            StringBuilder str1 = str.reverse();
            String str2 = new String(str1);
            int x = Integer.valueOf(str2);
            System.out.print(-x);
        }
    }
}
